<template>
    <div>
        <h1>插槽</h1>
        <div style="color:red;" @click="show(content)">
            <slot />
        </div>
    </div>
</template>

<script>
    export default {
        props: ['content'],
        methods:{
            show(content){
                console.log('子组件调用'+content);
            }
        }
    }
</script>

<style lang="scss" scoped>

</style>